/*
 * @(#)Now.java	1.00 10/06/21
 *
 * Copyright 2010 Kmdigit, Inc. All rights reserved.
 * KMdigit PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */

package kmdigit.hello;

import java.io.IOException;
import java.io.Reader;
import java.sql.SQLException;

import com.ibatis.common.resources.Resources;
import com.ibatis.sqlmap.client.SqlMapClient;
import com.ibatis.sqlmap.client.SqlMapClientBuilder;

/**
 * @author  Kyunam Lee
 * @version 1.00, 06/21/10
 */
public class Now {
	public static void main(String[] args) throws IOException, SQLException {
		String resource = "SqlMapConfig.xml";
		Reader reader = Resources.getResourceAsReader(resource);
		SqlMapClient sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);
		String now = (String)sqlMap.queryForObject("nowTime");
		
		System.out.println(now);
	}
}
